﻿//Write a program that prints all the numbers from 1 to N, that are not divisible by 3 and 7 at the same time.

using System;

class NumbersToNNotDivBy3And7
{
    static void Main()
    {
        Console.Write("N = ");
        int maxNumber = int.Parse(Console.ReadLine());
        for (int number = 1; number <= maxNumber; number++)
        {
            if (!(number % (3*7) == 0))
            {
                Console.WriteLine(number);
            }
        }
    }
}
